package book;

public class BookList {
    private Book[] books = new Book[10];
    private int userSize;//记录当前书架上放了几本书
    public BookList(){
        books[0] = new Book("三国演义","罗贯中",46,"小说");//抽象数组初始化
        books[1] = new Book("西游记","吴承恩",29,"小说");
        books[2] = new Book("水浒传","施耐庵",8,"小说");
        this.userSize = 3;
    }
    public Book getBook(int pos){
        return books[pos];
    }

    public int getUserSize() {
        return userSize;
    }

    public void setUserSize(int userSize) {
        this.userSize = userSize;
    }
    public void setBooks(int pos,Book book){
        books[pos] = book;
    }

}
